﻿@using Skywalker.Webshop.ViewModels
@{
    var signup = (SignupViewModel)Model.Signup;

    Style.Require("Skywalker.Webshop.Common");
}
 
<h2>@T("New customer")</h2>
<p>@T("Please fill out the form below")</p>
 
@Html.ValidationSummary()
 
@using (Html.BeginFormAntiForgeryPost(Url.Action("Signup", "Checkout", new { area = "Skywalker.Webshop" }))) {    
    <article class="form">
        <fieldset>
            <ul>
                <li>
                    <div class="field-label">@Html.LabelFor(m => signup.Title, T("Title"))</div>
                    <div class="field-editor">@Html.EditorFor(m => signup.Title)</div>
                </li>
                <li>
                    <div class="field-label">@Html.LabelFor(m => signup.FirstName, T("First name"))</div>
                    <div class="field-editor">@Html.EditorFor(m => signup.FirstName)</div>
                </li>
                <li>
                    <div class="field-label">@Html.LabelFor(m => signup.LastName, T("Last name"))</div>
                    <div class="field-editor">@Html.EditorFor(m => signup.LastName)</div>
                </li>
            </ul>
        </fieldset>
    
        <fieldset>
            <ul>
                <li>
                    <div class="field-label">@Html.LabelFor(m => signup.Email, T("Email"))</div>
                    <div class="field-editor">@Html.EditorFor(m => signup.Email)</div>
                </li>
                <li>
                    <div class="field-label">@Html.LabelFor(m => signup.Password, T("Password"))</div>
                    <div class="field-editor">@Html.EditorFor(m => signup.Password)</div>
                </li>
                <li>
                    <div class="field-label">@Html.LabelFor(m => signup.RepeatPassword, T("Repeat password"))</div>
                    <div class="field-editor">@Html.EditorFor(m => signup.RepeatPassword)</div>
                </li>
            </ul>
        </fieldset>
    
        <fieldset>
            <ul>
                <li>
                    <div class="checkbox-and-label">
                        <div class="checkbox">@Html.CheckBoxFor(m => signup.ReceiveNewsletter)</div>
                        <div class="label">@Html.LabelFor(m => signup.ReceiveNewsletter, T("Subscribe to our mailing list"))</div>
                    </div>
                </li>
                <li>
                    <div class="checkbox-and-label">
                        <div class="checkbox">@Html.CheckBoxFor(m => signup.AcceptTerms)</div>
                        <div class="label">
                            <label for="@Html.FieldIdFor(m => signup.AcceptTerms)">
                                @Html.Raw(T("I have read and accept the <a href=\"{0}\" target=\"_blank\">Terms and Conditions</a>", "#").ToString())
                            </label>
                        </div>
                    </div>
                </li>
            </ul>
        </fieldset>
    
        <footer class="commands">
            <ul>
                <li class="align left"><a href="#">@T("Cancel")</a></li>
                <li class="align right"><button type="submit">@T("Next")</button></li>
            </ul>
        </footer>
    </article>
}